package com.test;

import static java.lang.Integer.sum;

public class demo3 {//类名必须和文件名一样
    public static void main(String[] args){
        print();
        System.out.println(getSum(1,2));
        System.out.println(compare(5,6));
    }

    private static boolean compare(int a, int b) {
        if (a == b){
            return true;
        }else {
            return false;
        }
    }

    public static void print() {
        for (int i = 0; i < 5; i++) {//使用i和j必须要进行声明
            for (int j = 0; j < 8; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
    public static int getSum(int a, int b){
            int c = sum(a,b);
            return c;  //定义了返回值类型的方法必须return
        }
}

